<template>
    <div id="guess">
        <div id="scroller">
            <ul class="spot-inner" :style="newWidth">
                <li class="spot-inner-con" v-for="(x,y) in proGroup" :id="x.id" :type="x.id_type"  @click="goNewDetail($event)">
                    <div class="swiper-slides">
                        <ul class="goods1">
                            <li class="photo"><img :src="x.pro_img" style="border-radius:.1rem;"></li>
                            <li class="test" style="height: .72rem;-webkit-box-orient: vertical;">{{x.pro_title}}</li>
                            <li class="money">￥<span style="font-size:.28rem;">{{x.pro_price}}</span></li>
                        </ul>
                    </div>
                </li>
            </ul>
        </div>        
    </div>
</template>

<script>
    //import IScroll from 'iscroll/build/iscroll-probe.js';
    export default {
        data(){
			return {
                newWidth:''
			}
		},
        props:{
            proGroup:Array
        },
        updated(){
			//this.createIScroll()
		},
        methods: {
            // createIScroll() {
            //     this.myScroll = new IScroll('#scroller', {  probeType: 3, mouseWheel: true, scrollX: true, scrollY: false,preventDefault:false});
            // },

            goNewDetail($event){
                var proId=$event.currentTarget.getAttribute('id'),
                    type=$event.currentTarget.getAttribute('type');
                this.$router.push('/newDetail/'+proId+''+'/'+type);
            }
        }
    }       
</script>

<style>
</style>
